package method;

public class MethodDemo1 {

    public static void main(String[] args){
    int sum = getSum(1,2);
    System.out.println(sum);
    System.out.println(getCode(4));
    System.out.println(getCode(5));
}
    public static int getSum(int a,int b){
        return a+b;
    }


    public static String getCode(int len){
        String code = "";
        for(int i = 0;i<len;i++){
            int num = (int)(Math.random()*10);
            code += num;
        }
        return code;
    }
}

